package com.turing.data.model.domain.element;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description 要素do对象
 * @Author lcy
 * @Date 2021-06-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Builder(toBuilder = true)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class Element extends Model<Element> {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("parent_ele_id")
    private Integer parentEleId;

    @ApiModelProperty(value = "映射名")
    @TableField("map_name")
    private String mapName;

    @ApiModelProperty(value = "模板id")
    @TableField("template_id")
    private String templateId;

    @ApiModelProperty(value = "要素名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "要素类型 单项 多项")
    @TableField("multiple")
    private String multiple;

    @ApiModelProperty(value = "文件夹id")
    @TableField("package_sn")
    private String packageSn;

    @ApiModelProperty(value = "0false 1true")
    @TableField("selected")
    private Integer selected;

    @ApiModelProperty(value = "0未删除 1已删除")
    @TableField("is_del")
    private Integer isDel;

    @TableField("created_time")
    private Date createdTime;

    @ApiModelProperty(value = "最后更新时间")
    @TableField("updated_time")
    private Date updatedTime;

    @ApiModelProperty(value = "数据类型 字符串 数字 日期 字符串 长文本")
    @TableField("type")
    private String type;

    @ApiModelProperty(value = "模型要素 0 业务要素 1")
    @TableField("category")
    private Integer category;

    @ApiModelProperty(value = "是否被纳入统计 1是 0否")
    @TableField("counted")
    private Integer counted;

    @TableField("no")
    private Integer no;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}

